{include file="../template/header.html" /}

<div class="my-3 my-md-5">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 mx-auto">
                <form class="card" method="POST" enctype="multipart/form-data" >
                    <div class="card-body">
                        <h3 class="card-title">会员信息修改（仅限基本信息）</h3>
                        <div class="row">
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">姓名</label>
                                    <input type="text" class="form-control" name="name" required value="{$u['name']}">
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">医生</label>
                                    <select class="form-control" name="doctor">
                                        {volist name="d" id="data"}
                                        <option value="{$data['id']}">{$data['name']}</option>
                                        {/volist}
                                    
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">性别</label>
                                    <div class="custom-controls-stacked">
                                        <label class="custom-control custom-radio custom-control-inline">
                                            <input type="radio" class="custom-control-input" name="gender" value="male"
                                            {eq name="u.gender" value="1"}checked{/eq} required>
                                            <span class="custom-control-label">男</span>
                                        </label>
                                        <label class="custom-control custom-radio custom-control-inline">
                                            <input type="radio" class="custom-control-input" name="gender"
                                                value="female" {eq name="u.gender" value="0"}checked{/eq} required>
                                            <span class="custom-control-label">女</span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                        <div class="row">
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">电话</label>
                                    <input type="number" class="form-control" name="tel" required value="{$u['tel']}">
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">复诊日期</label>
                                    <input type="date" id="lastdate" class="form-control" name="lastdate" required value="{$u['lastdate']}">
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">就诊日期</label>
                                    <input type="date" id="firstdate" class="form-control" name="firstdate" required value="{$u['firstdate']}">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-8">
                                <div class="form-group">
                                    <label class="form-label">住址</label>
                                    <input type="text" class="form-control" name="address" required value="{$u['address']}">
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="form-label">积分</label>
                                    <input type="number" class="form-control" name="points" required value="{$u['integral']}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="card-footer text-right">
                        <button type="submit" class="btn btn-primary" name="edit">修改</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{include file="../template/footer.html" /}